<?php



	/*
	 * All rights Reserved, Designed By www.youyacao.com <br>
	 * @Description:统计 <br>
	 * @version 蜻蜓C影视追剧系统  <br>
	 * @author:成都市一颗优雅草科技有限公司  <br>
	 * 注意：使用我司开源源代码请遵循license文件的协议仅供个人非盈利使用，禁止用于其他的商业用途
	 * 需要商业用途或者定制开发等可访问songshu.youyacao.com  联系QQ:2853810243 422108995 23625059584
	 * 正版系统查询系统 zhengbancha.youyacao.com
	 */
    
    
namespace App\Admin\Controllers;

use App\Admin\Metrics\User;
use App\Http\Controllers\Controller;
use Dcat\Admin\Http\Controllers\Dashboard;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;

class StatController extends Controller
{
    public function index(Content $content)
    {
        $usercount = \App\Models\User::count();
        return $content
            ->header('用户信息')
            ->description('')
            ->body(function (Row $row) use ($usercount) {
                $row->column(12, function (Column $column) use ($usercount) {
                    $column->row(function (Row $row) use ($usercount) {
                        $row->column(3, new User\TotalUsers(json_encode(['title' => '总用户', 'num' => $usercount])));
                        $row->column(3, new User\TotalUsers(json_encode(['title' => '总用户', 'num' => $usercount])));
                    });
                });
            });
    }
}
